﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SysDefinitions.master" AutoEventWireup="true"
    CodeBehind="Nationalities.aspx.cs" Inherits="SCFHS.Views.SystemDefinitions.Nationalities" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NastedHeader" runat="server">
<script type="text/javascript">
    $(document).ready(function () {
        $("#lokups").show();
    });
        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NastedBody" runat="server">
    <div id="citiesCont">
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <div class="userInfo Box row radius-Bottom">
                    <div class="ContentTitle">
                        إضافة جنسية جديدة
                    </div>
                    <asp:Label ID="Label1" Text="قم بكتابة إسم الجنسية ثم إضغط على زر إضافة ليتم الحفظ"
                        runat="server" CssClass="tooltip" />
                    <div class="inputArea row">
                        <asp:Label Text=" " ID="lblMessage" runat="server" CssClass="info" />
                        <div class="row">
                            <ul class="title">
                                <li style="font-size: 16px;">إسم الجنسية</li>
                            </ul>
                            <ul class="data">
                                <li>
                                    <asp:TextBox runat="server" Font-Size="16" ID="txtNationalityName" ValidationGroup="Add" /><asp:RequiredFieldValidator
                                        ErrorMessage="يجب كتابة إسم الجنسية اولا" ControlToValidate="txtNationalityName"
                                        runat="server" ValidationGroup="Add" Text="*" ForeColor="Red" /></li>
                            </ul>
                            <ul class="data">
                                <li>
                                    <asp:Button Text="إضافة" runat="server" ID="btnAddNationality" OnClick="btnAddNationality_Click"
                                        ValidationGroup="Add" CssClass="button" /></li>
                            </ul>
                        </div>
                    </div>
                    <div class="viewArea">
                        <div>
                            <asp:GridView runat="server" ID="grNationalities" AutoGenerateColumns="False" CellPadding="4"
                                ForeColor="#333333" GridLines="Both" Width="500px" OnRowCancelingEdit="grNationalities_RowCancelingEdit"
                                OnRowEditing="grNationalities_RowEditing" OnRowDeleting="grNationalities_RowDeleting"
                                OnRowUpdating="grNationalities_RowUpdating" DataKeyNames="ID">
                                <AlternatingRowStyle BackColor="White" />
                                <EditRowStyle BackColor="#2461BF" />
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <%# Container.DataItemIndex +1 %></ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="إسم الجنسية">
                                        <ItemTemplate>
                                            <asp:Label Text='<%# Eval("Name")%>' runat="server" Width="300" />
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtNationalityName" Text='<%# Eval("Name")%>' runat="server" Width="300"
                                                ValidationGroup="Update"></asp:TextBox><asp:RequiredFieldValidator ErrorMessage="*"
                                                    ControlToValidate="txtNationalityName" runat="server" ValidationGroup="Update" />
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:CommandField ButtonType="Link" CancelImageUrl="" CancelText="إلغاء" ShowCancelButton="true"
                                        EditImageUrl="" EditText="تعديل" ShowEditButton="true" DeleteImageUrl="" DeleteText="حذف"
                                        ShowDeleteButton="true" UpdateImageUrl="" UpdateText="تحديث" ItemStyle-Width="100"
                                        ValidationGroup="Update" />
                                </Columns>
                                <EmptyDataTemplate>
                                    لم تتم إضافة أية جنسيات بعد!
                                </EmptyDataTemplate>
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#EFF3FB" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                <SortedDescendingHeaderStyle BackColor="#4870BE" />
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
